# -*- coding: utf-8 -*-
import os,sys,re,time
from siplib import *
from env import *

# _range = 10,20 ... 100 mA
# _range = 100,200, ... 1000 mA
# _range = 1250,1500, ... 13000 mA

def create_curr_list(curr):
    curr_list = []
    if curr <= 100:
        curr_list = [i for i in range(10,101,10)]
    if 100 < curr <= 1000:
        curr_list

logger = LogController('doe.log')
connect_devices(logger,uart_cmdsets=[],usb_cmdsets=[TEKMSO4104B_CmdSets])
# connect_port(logger)
# # fixture = get_port('UART1')
# usb = get_port('USB1')
# print(usb.dmm.volt.query())
# usb2 = get_port('USB2')
# usb2.outp('ON','1,2')
list_device()
tek=get_port('USB1')
tek.vertical.select.set(2,'ON')
info=tek.info(action='query')
print(info)
tek.vertical.select.set(2,'OFF')
tek.screen_capture(tsname()+'.png')
tek.vertical.label.query(1)
tek.vertical.label.query(3)

